package com.kgc.service;

import com.kgc.bean.OrderItem;

import java.util.Map;

/**
 * @Classname WeChatPayService
 * @Description 微信支付接口
 * @Date 2021/6/23 16:29
 * @Created by 17402
 */
public interface WeChatPayService {
    /**
     * @description:  封装微信统一下单接口参数，注意顺序
     * @param: [totalFee, buyDetail, spbillCreateIp, token]
     * @return: java.lang.String
     * @author yintao
     * @date 2021/6/23 16:39
     */
    String createWxorderParam2XmlStr(String totalFee, String buyDetail, String spbillCreateIp, String token) throws Exception;
    /**
     * @description: 调用微信统一下单接口，生产预支付订单，返回结果， 将微信接口的xml数据转为map返回
     * @param: [wxPayParamsXmlStr]
     * @return: java.util.Map<java.lang.String,java.lang.String>
     * @author yintao
     * @date 2021/6/23 16:42
     */
    Map<String,String> send2WechatPayOrder(String wxPayParamsXmlStr) throws Exception;
    /**
     * @description: 解析微信异步回调结果，成功返回响应
     * @param: [wxPayNotify] 微信回调通知接口传过来的数据
     * @return: java.lang.String 返回给微信接口的xml数据
     * @author yintao
     * @date 2021/6/23 16:42
     */
    String resolveWechatPayNotify(String wxPayNotify, OrderItem orderItem) throws Exception;


}
